
#include "stdafx.h"
#include "WicMetadataBlockWriter.h"

CWicMetadataBlockWriter::CWicMetadataBlockWriter()
{
    m_pIWICMetadataBlockWriter = NULL;
}

CWicMetadataBlockWriter::~CWicMetadataBlockWriter()
{
    if(m_pIWICMetadataBlockWriter)
    {
        m_pIWICMetadataBlockWriter->Release();
    }
    m_pIWICMetadataBlockWriter = NULL;
}

CWicMetadataBlockWriter::CWicMetadataBlockWriter(CWicMetadataBlockWriter const & objMetadataBlockWriter)
{
    m_pIWICMetadataBlockWriter = objMetadataBlockWriter.m_pIWICMetadataBlockWriter;
    m_pIWICMetadataBlockWriter->AddRef();
}

CWicMetadataBlockWriter& CWicMetadataBlockWriter::operator=(CWicMetadataBlockWriter const & objMetadataBlockWriter)
{
    if(m_pIWICMetadataBlockWriter)
    {
        m_pIWICMetadataBlockWriter->Release();
    }
    m_pIWICMetadataBlockWriter = objMetadataBlockWriter.m_pIWICMetadataBlockWriter;
    m_pIWICMetadataBlockWriter->AddRef();
    return *this;
}
